<script type="text/javascript">
{literal}$(document).ready(function(){
    $('[name="kategorija"]').change(function() {
        if($(this).val()=="0") {
            $('#nova_kategorija').removeAttr('disabled');
        }
        else {
            $('#nova_kategorija').attr('disabled','disabled');
        }
    });
});
{/literal}
</script>

<div class="page">

    <div class="sidebar_page">
        <form action="?handler=video_input" method="post">
            <div class="content">
                <div id="articles">
                    <div class="page_capt clearfix">
                        <div class="fl_left">
                            <h2>Dodaj novi Video</h2>
                        </div>
                    </div>
                    <div class="video_post">
                        <label class="video_label" for="title">Video:</label>
                        <input type="text" name="url" value="" class="video_input required" />
                    </div>
                    <div class="video_post video_tags" >
                        <label class="video_label"  for="title">Ključne reči:</label>
                        <input type="text" name="tags" value="" class="video_input required" />
                    </div>
                    <div class="video_post video_tags" >
                        <label class="video_label"  for="title">Kategorija:</label>
                        <select name="kategorija">
                            <option value="0">Unesi novu</option>
                            {foreach from=$kategorije item='kategorija'}
                                <option value="{$kategorija.kategorija}">{$kategorija.kategorija}</option>
                            {/foreach}
                        </select>
                        <input type="text" id="nova_kategorija" name="nova_kategorija" class="required" />

                    </div>
                    <div class="video_description">
                        <label class="video_label"  for="title">Opis:</label>
                        <textarea  name="description" rows="10" cols="20" class="required"></textarea>
                    </div>
                    <input type="hidden" name="username" value="{$user.username}" />
                    <input id="btn_video" type="submit" name="postavi" value="Postavi" />
                </div>
            </div>
        </form>
    </div>
</div>

